<template>
<el-card body-style="padding: 10px" shadow="hover" class="job-card" @click="toPosition(position.enterprise_id)">
  <div class="explanation">岗位信息</div>
  <h3>{{ position.name }}</h3>
  <p>{{ position.requirement }}</p>
  <el-tag>薪资：{{ position.salary }}</el-tag>
</el-card>
</template>

<script>
export default {
  name: "PositionMessageEle",
  props: {
    position: {
      type: Object,
    }
  },
  methods: {
    toPosition(id) {
      this.$router.push({path: "/position", query: {id: id} });
    }
  }
}
</script>

<style scoped>
.job-card {
  cursor: pointer;
  transition: transform 0.2s ease;
  overflow: hidden;
}

.job-card:hover {
  cursor: pointer;
}

.explanation {
  height: 15px;
  line-height: 12px;
  font-size: 12px;
  color: #8492a6;
}
</style>